package com.atguigu.singleton.type8;

/**
 * @author gcq
 * @Create 2020-09-30
 */
public class SingletonTest08 {
    public static void main(String[] args) {
        Singleton s = Singleton.INSTANCE;
        Singleton s2 = Singleton.INSTANCE;
        System.out.println(s == s2);
        s.sayOk();
    }
}
enum Singleton {
    INSTANCE;
    public void sayOk() {
        System.out.println("ok~");
    }
}